iT邦幫忙

DAY 5
0

程式隨手寫系列 第 5

小功能(4)

  • 分享至 

  • xImage
  •  
 private void button1_Click(object sender, EventArgs e)
        {
            Graphics graphics = this.CreateGraphics();
            Pen myPen = new Pen(Color.Blue, 1);
            int beginX = 50;
            int beginY = 60;
            int height = 40;
            int width = 55;
            Point X1 = new Point(beginX, beginY);
            Point Y1 = new Point(beginX + 210, beginY);
            Point X2 = new Point(beginX, beginY - 45);
            Point Y2 = new Point(beginX, beginY + 45);
            graphics.DrawLine(myPen, X1, Y1);
            graphics.DrawLine(myPen, X2, Y2);
            graphics.DrawBezier(myPen, beginX, beginY, beginX + 15, beginY - height, beginX + 40, beginY - height, beginX + width, beginY);
            graphics.DrawBezier(myPen, beginX + width , beginY, beginX + width  + 15, beginY + height, beginX + width  + 40, beginY + height, beginX + width * 2, beginY);
            graphics.DrawBezier(myPen, beginX + width * 2, beginY, beginX + width * 2 + 15, beginY - height, beginX + width * 2 + 40, beginY - height, beginX + width * 3, beginY);
            graphics.DrawBezier(myPen, beginX + width * 3, beginY, beginX + width * 3 + 15, beginY + height, beginX + width * 3 + 40, beginY + height, beginX + width * 4, beginY);

        }

繪製波形圖


上一篇
想不到標題(3)
下一篇
簡單介紹看code方法(5)
系列文
程式隨手寫20
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 則留言

0

我要留言

立即登入留言